package org.example.setup.controller;

import org.example.model.common.Result;
import org.example.model.domain.account.ExpressAccount;
import org.example.setup.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("SetUp/Account")
public class AccountController {


    @Autowired
    private AccountService accountService;

    @GetMapping("selectByIp/{ip}")
    public Result selectByIp(@PathVariable("ip") String ip){
        ExpressAccount expressAccount = accountService.selectByIp(ip);
        return Result.build(200,"查询成功",expressAccount);
    }


}
